<?php
class ResourceRepertoireInfo extends Resource
{
	private $RepertoireItemID;
	private $ComposerID;
	private $ItemTitle;
	private $Voices;
	private $Text;
	private $Translation;
	
	
	public function __construct($database, $resourceID)
	{
		$this->database = $database;
		parent::__construct($database, $resourceID);
		
		if ($resourceID != 0)
		{
			$sql = "SELECT * from RepertoireItems WHERE ResourceIDP=".$this->resourceID;
			$this->database->ExecuteSQL($sql);
			$row = $this->database->getRow();
			
			$this->RepertoireItemID = $row['RepertoireItemID'];
			$this->ComposerID = $row['ComposerIDT'];
			$this->ItemTitle = $row['Title'];
			$this->Voices = $row['Voices'];
			$this->Text = $row['Text'];
			$this->Translation = $row['Translation'];

		}
		
		
	}
	
	public function getFullHTML()
	{
//		echo "boo<br>\n";
		$html = "<p>".$this->ItemTitle."</p>\n";
		$composer = new ResourceComposer($this->database,0);
		$composer->loadComposer($this->ComposerID);
		$html .= $composer->getSummaryHTML();
		$html .= "<p>".$this->Voices."</p>\n";
		$html .= "<p>".$this->Text."</p>\n";
		$html .= "<p>".$this->Translation."</p>\n";
		return $html;
	}
}

?>